<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>

    <title>Title</title>
    <style type="text/css">

        .upload-file{
            position: relative;
            border:1px solid skyblue;
            color: skyblue;
            display: inline-block;
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
        }
        .upload-file [type='file']{
            opacity: 0;
            position: absolute;
            left: 0;
            top: 0;
            width: 100px;
            height: 40px;
        }
        .upload-file .text{
            position: absolute;
            left: 0;
            top: 0;
            width: 100px;
            height: 40px;
        }
        .upload-file .text:hover,.upload-file .text:active{
            color: #888;
        }
    </style>
</head>
<body>
<h1></h1>

<!-- enctype="multipart/form-data" 上传文件一定要写 -->
<form id="form" action="1-include.php"  method="post" enctype="multipart/form-data" >
    <input type="radio" name="user" />
    <!--GET['user']-->

    <!--单图上传-->
    <!--<input type="file"   name="file1" accept="image/gif,image/jpeg,image/jpg,image/png" >-->

    <div class="upload-file">
        <!--多图上传-->
        <span class="text">上传图片</span>
        <input id="file"  type="file" multiple name="file1[]" accept="image/gif,image/jpeg,image/jpg,image/png">
    </div>
    <!--$FILES['file1'];-->

    <input type="submit" value="上传"/>
    <input type="reset" />


    <input id="a" type="button" value="选择图片"/>
</form>


<script type="text/javascript" src="jquery-3.4.1.js"></script>
<script type="text/javascript" >
    $(function(){
        // $("#form").submit();//直接提交
        $("#a").on("click",function () {
            $("#file").trigger("click");//触发点击事件
        })
    })

</script>

</body>
</html>
